import { createRouter, createWebHashHistory } from 'vue-router'
import HomeView from '../views/second/HomeView.vue'
import homeRouter from '../views/home/router'
import second from '../views/second/router'
// console.log(homeRouter);
const routes = [
  {
    path: '/',
    name: 'home',
    component: HomeView,
    redirect: '/index', // 路由的定向
    // children: [
    //   ...homeRouter
    // ]
    children: homeRouter
  },
  ...second
]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router
